package com.by.aop;

/**
 * @version 1.0
 * @Author 彭彦彬
 * @Date 2025/4/8 20:23
 * @注释
 */
public class LoggingInterceptor implements MethodInterceptor {
    @Override
    public Object invoke(MethodInvocation invocation) throws Throwable {
        System.out.println("Before method: " + invocation.getMethod().getName());
        Object result = invocation.proceed();
        System.out.println("After method: " + invocation.getMethod().getName());
        return result;
    }
}
